﻿CREATE TABLE [dbo].[Contact] (
    [IDContact]    INT          IDENTITY (1, 1) NOT NULL,
    [Nume]         VARCHAR (50) NULL,
    [Prenume]      VARCHAR (50) NULL,
    [IDTipContact] SMALLINT     NULL,
    [CNP]          DECIMAL (13) NULL,
    [StareCivila]  VARCHAR (2)  NULL,
    [Functie]      VARCHAR (50) NULL,
    [Departament]  VARCHAR (50) NULL,
    [TipAI]        VARCHAR (2)  NULL,
    [SerieAI]      VARCHAR (10) NULL,
    [NumarAI]      DECIMAL (10) NULL,
    [IDPartener]   BIGINT       NULL,
    CONSTRAINT [PK_Contact] PRIMARY KEY CLUSTERED ([IDContact] ASC),
    CONSTRAINT [FK_Contact_Parteneri] FOREIGN KEY ([IDPartener]) REFERENCES [dbo].[Parteneri] ([IDPartener]),
    CONSTRAINT [FK_Contact_TipContact] FOREIGN KEY ([IDTipContact]) REFERENCES [dbo].[TipContact] ([IDTipContact])
);

